<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<input type="number" id="num1"/>
<select id="slc">
    <option value="+">+</option>
    <option value="-">-</option>
    <option value="x">x</option>
    <option value="/">/</option>
</select>
<input type="number" id="num2"/>
<input type="button" value="=" id="btn"/>
<input type="number" id="sum">
<script>
    document.getElementById("btn").onclick = function(){
        var num1 = document.getElementById("num1").valueAsNumber;
        var num2 = document.getElementById("num2").valueAsNumber;
        var sum = 0;
        var select = document.getElementById("slc").value;
        alert(num1);
        alert(num2);
        alert(select);
        if(select == "+"){
            sum = num1 + num2;
        }else if(select == "-"){
            sum = num1 - num2;
        }else if(select == "x"){
            sum = num1 * num2;
        }else if(select == "/"){
            sum = num1 / num2;
        }
        document.getElementById("sum").valueAsNumber = sum;
    }
</script>
</body>
</html>